﻿{
	"ProcessTemplates": [
		{
			"Name": "JSON file from SFTP server to Oracle DB INSERT",
			"Modified": "2024-05-14T11:36:18.774758",
			"Modifier": "jefim.borissov@frends.com",
			"Tags": [
				"Json",
				"SFTP",
				"Oracle"
			],
			"TemplateProcessTags": [],
			"Description": "This process will retrieve a **JSON file** from the specified **SFTP** server.\nIt will take the contents of the file and use it to  create an **Oracle Database** INSERT statement. It will then execute the statement on the specified **Oracle Database**.",
			"Version": 1,
			"UniqueIdentifier": "0e80d33c-fae2-4006-8bd0-82c0432850b4",
			"ProcessVariablesJson": "{\"FilePath\":{\"Value\":\"\\\"/\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Path of the file to be read from the SFTP server.\"},\"ServerAddress\":{\"Value\":\"\\\"127.0.0.1\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"SFTP server address.\"},\"ServerUser\":{\"Value\":\"\\\"user\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"SFTP server user.\"},\"ServerPassword\":{\"Value\":\"\\\"password\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"SFTP server password.\"},\"OracleConnectionString\":{\"Value\":\"\\\"Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"Connection string to access the database.\"},\"TableName\":{\"Value\":\"\\\"table\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"Table name in the database.\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "JSON file from SFTP server to Oracle DB INSERT",
					"Modified": "2024-05-14T11:36:18.774758",
					"Modifier": "jefim.borissov@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This process will retrieve a **JSON file** from the specified **SFTP** server.\nIt will take the contents of the file and use it to  create an **Oracle Database** INSERT statement. It will then execute the statement on the specified **Oracle Database**.",
					"Version": 1,
					"UniqueIdentifier": "050bc8be-da28-4aa2-a24a-9b257e210fb2",
					"GraphJson": null,
					"Bpmn": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"sample-diagram\" targetNamespace=\"http://bpmn.io/schema/bpmn\" xsi:schemaLocation=\"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd\"><bpmn2:process id=\"Process_1\" isExecutable=\"false\"><bpmn2:startEvent id=\"StartEvent_1\" name=\"Manual\"><bpmn2:outgoing>Flow_00uh5zi</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_1t3j2vx\" name=\"Read JSON input file from SFTP server\"><bpmn2:incoming>Flow_00uh5zi</bpmn2:incoming><bpmn2:outgoing>Flow_0hrntp0</bpmn2:outgoing><bpmn2:property id=\"Property_1qc75f2\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_17r5rlk\"><bpmn2:sourceRef>DataObjectReference_0ksp4rn</bpmn2:sourceRef><bpmn2:targetRef>Property_1qc75f2</bpmn2:targetRef></bpmn2:dataInputAssociation><bpmn2:standardLoopCharacteristics /></bpmn2:task><bpmn2:exclusiveGateway id=\"Gateway_14nb58k\" name=\"File read successful?\" default=\"Flow_0z1bkrr\"><bpmn2:incoming>Flow_0hrntp0</bpmn2:incoming><bpmn2:outgoing>Flow_0fqwnfb</bpmn2:outgoing><bpmn2:outgoing>Flow_0z1bkrr</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:dataObjectReference id=\"DataObjectReference_0ksp4rn\" name=\"JSON file\" dataObjectRef=\"DataObject_0ovso3e\" /><bpmn2:dataObject id=\"DataObject_0ovso3e\" /><bpmn2:sequenceFlow id=\"Flow_0hrntp0\" sourceRef=\"Activity_1t3j2vx\" targetRef=\"Gateway_14nb58k\" /><bpmn2:sequenceFlow id=\"Flow_00uh5zi\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_1t3j2vx\" /><bpmn2:sequenceFlow id=\"Flow_0fqwnfb\" name=\"yes\" sourceRef=\"Gateway_14nb58k\" targetRef=\"Activity_15xgbxn\" /><bpmn2:subProcess id=\"Activity_0fizi4r\" name=\"For Each row in file\"><bpmn2:incoming>Flow_0lhekcx</bpmn2:incoming><bpmn2:outgoing>Flow_10w7jgx</bpmn2:outgoing><bpmn2:multiInstanceLoopCharacteristics isSequential=\"true\" /><bpmn2:startEvent id=\"Event_1izsk9n\"><bpmn2:outgoing>Flow_0e2milx</bpmn2:outgoing><bpmn2:outgoing>Flow_00xstmy</bpmn2:outgoing></bpmn2:startEvent><bpmn2:scriptTask id=\"Activity_1mnaiqp\" name=\"Create insert statement\"><bpmn2:incoming>Flow_0e2milx</bpmn2:incoming><bpmn2:outgoing>Flow_0y53ouc</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:task id=\"Activity_04rh3p3\" name=\"Execute the INSERT statement\"><bpmn2:incoming>Flow_1qzjp8h</bpmn2:incoming><bpmn2:incoming>Flow_0y53ouc</bpmn2:incoming><bpmn2:outgoing>Flow_171wek0</bpmn2:outgoing><bpmn2:standardLoopCharacteristics /></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0e2milx\" sourceRef=\"Event_1izsk9n\" targetRef=\"Activity_1mnaiqp\" /><bpmn2:scriptTask id=\"Activity_1vh9nk4\" name=\"Create parameter values\"><bpmn2:incoming>Flow_00xstmy</bpmn2:incoming><bpmn2:outgoing>Flow_1qzjp8h</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_1qzjp8h\" sourceRef=\"Activity_1vh9nk4\" targetRef=\"Activity_04rh3p3\" /><bpmn2:endEvent id=\"Event_13pr8r2\"><bpmn2:incoming>Flow_0c2yo7g</bpmn2:incoming><bpmn2:incoming>Flow_10c52wl</bpmn2:incoming></bpmn2:endEvent><bpmn2:exclusiveGateway id=\"Gateway_0ah3ngq\" name=\"Database update successful?\" default=\"Flow_0yosttx\"><bpmn2:incoming>Flow_171wek0</bpmn2:incoming><bpmn2:outgoing>Flow_1otwlsz</bpmn2:outgoing><bpmn2:outgoing>Flow_0yosttx</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:scriptTask id=\"Activity_1al9zyu\" name=\"Increment success count\"><bpmn2:incoming>Flow_1otwlsz</bpmn2:incoming><bpmn2:outgoing>Flow_0c2yo7g</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:scriptTask id=\"Activity_1linepl\" name=\"Increment failcount\"><bpmn2:incoming>Flow_0yosttx</bpmn2:incoming><bpmn2:outgoing>Flow_10c52wl</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_0c2yo7g\" sourceRef=\"Activity_1al9zyu\" targetRef=\"Event_13pr8r2\" /><bpmn2:sequenceFlow id=\"Flow_1otwlsz\" name=\"yes\" sourceRef=\"Gateway_0ah3ngq\" targetRef=\"Activity_1al9zyu\" /><bpmn2:sequenceFlow id=\"Flow_0yosttx\" name=\"no\" sourceRef=\"Gateway_0ah3ngq\" targetRef=\"Activity_1linepl\" /><bpmn2:sequenceFlow id=\"Flow_171wek0\" sourceRef=\"Activity_04rh3p3\" targetRef=\"Gateway_0ah3ngq\" /><bpmn2:sequenceFlow id=\"Flow_00xstmy\" sourceRef=\"Event_1izsk9n\" targetRef=\"Activity_1vh9nk4\" /><bpmn2:sequenceFlow id=\"Flow_0y53ouc\" sourceRef=\"Activity_1mnaiqp\" targetRef=\"Activity_04rh3p3\" /><bpmn2:sequenceFlow id=\"Flow_10c52wl\" sourceRef=\"Activity_1linepl\" targetRef=\"Event_13pr8r2\" /><bpmn2:association id=\"Association_1k82moa\" sourceRef=\"Activity_1mnaiqp\" targetRef=\"TextAnnotation_0lqwta1\" /><bpmn2:textAnnotation id=\"TextAnnotation_0lqwta1\"><bpmn2:text>Code will create the INSERT statement based on the Column Names from the input file.</bpmn2:text></bpmn2:textAnnotation><bpmn2:textAnnotation id=\"TextAnnotation_11q3ahw\"><bpmn2:text>Code will create the parameters for the INSERT statement based on the Column Names from the input file.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_1kowv7f\" sourceRef=\"Activity_1vh9nk4\" targetRef=\"TextAnnotation_11q3ahw\" /></bpmn2:subProcess><bpmn2:scriptTask id=\"Activity_11zxk0m\" name=\"Initialise success count\"><bpmn2:incoming>Flow_09h1spc</bpmn2:incoming><bpmn2:outgoing>Flow_1ag74p7</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:scriptTask id=\"Activity_0kvjalz\" name=\"Initialise failure count\"><bpmn2:incoming>Flow_1ag74p7</bpmn2:incoming><bpmn2:outgoing>Flow_0lhekcx</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_1ag74p7\" sourceRef=\"Activity_11zxk0m\" targetRef=\"Activity_0kvjalz\" /><bpmn2:sequenceFlow id=\"Flow_0lhekcx\" sourceRef=\"Activity_0kvjalz\" targetRef=\"Activity_0fizi4r\" /><bpmn2:endEvent id=\"Event_1iedv3k\"><bpmn2:incoming>Flow_1fndhvi</bpmn2:incoming></bpmn2:endEvent><bpmn2:scriptTask id=\"Activity_0fx7zdo\" name=\"Create output message\"><bpmn2:incoming>Flow_10w7jgx</bpmn2:incoming><bpmn2:outgoing>Flow_1fndhvi</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_1fndhvi\" sourceRef=\"Activity_0fx7zdo\" targetRef=\"Event_1iedv3k\" /><bpmn2:sequenceFlow id=\"Flow_10w7jgx\" sourceRef=\"Activity_0fizi4r\" targetRef=\"Activity_0fx7zdo\" /><bpmn2:intermediateThrowEvent id=\"Event_0pvapan\" name=\"Throw an error if the file is empty\"><bpmn2:incoming>Flow_0z1bkrr</bpmn2:incoming><bpmn2:signalEventDefinition id=\"SignalEventDefinition_0pa8uoi\" /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_0z1bkrr\" name=\"no\" sourceRef=\"Gateway_14nb58k\" targetRef=\"Event_0pvapan\" /><bpmn2:task id=\"Activity_15xgbxn\" name=\"Parse JSON\"><bpmn2:incoming>Flow_0fqwnfb</bpmn2:incoming><bpmn2:outgoing>Flow_09h1spc</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_09h1spc\" sourceRef=\"Activity_15xgbxn\" targetRef=\"Activity_11zxk0m\" /><bpmn2:group id=\"Group_02jjq0w\" categoryValueRef=\"CategoryValue_01n27h4\" /><bpmn2:group id=\"Group_16avw1g\" categoryValueRef=\"CategoryValue_0lqerw8\" /></bpmn2:process><bpmn2:category id=\"Category_01u0cs7\"><bpmn2:categoryValue id=\"CategoryValue_01n27h4\" value=\"Download JSON from SFTP\" /></bpmn2:category><bpmn2:category id=\"Category_19pww73\"><bpmn2:categoryValue id=\"CategoryValue_0lqerw8\" value=\"Insert data into database\" /></bpmn2:category><bpmndi:BPMNDiagram id=\"BPMNDiagram_1\"><bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Process_1\"><bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" bpmnElement=\"StartEvent_1\"><dc:Bounds x=\"412\" y=\"160\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"412\" y=\"196\" width=\"37\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1t3j2vx_di\" bpmnElement=\"Activity_1t3j2vx\"><dc:Bounds x=\"510\" y=\"138\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_14nb58k_di\" bpmnElement=\"Gateway_14nb58k\" isMarkerVisible=\"true\"><dc:Bounds x=\"665\" y=\"153\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"661\" y=\"115.5\" width=\"58\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataObjectReference_0ksp4rn_di\" bpmnElement=\"DataObjectReference_0ksp4rn\"><dc:Bounds x=\"542\" y=\"305\" width=\"36\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"538\" y=\"362\" width=\"47\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0pvapan_di\" bpmnElement=\"Event_0pvapan\"><dc:Bounds x=\"672\" y=\"312\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"650\" y=\"355\" width=\"81\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_15xgbxn_di\" bpmnElement=\"Activity_15xgbxn\"><dc:Bounds x=\"780\" y=\"138\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_11zxk0m_di\" bpmnElement=\"Activity_11zxk0m\"><dc:Bounds x=\"965\" y=\"163\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_09stvfy\" bpmnElement=\"Activity_0kvjalz\"><dc:Bounds x=\"1065\" y=\"163\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0fx7zdo_di\" bpmnElement=\"Activity_0fx7zdo\"><dc:Bounds x=\"1930\" y=\"138\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1iedv3k_di\" bpmnElement=\"Event_1iedv3k\"><dc:Bounds x=\"2092\" y=\"160\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0fizi4r_di\" bpmnElement=\"Activity_0fizi4r\" isExpanded=\"true\"><dc:Bounds x=\"1160\" y=\"-10\" width=\"730\" height=\"380\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_190lrq6\" bpmnElement=\"TextAnnotation_0lqwta1\"><dc:Bounds x=\"1460\" y=\"30\" width=\"150\" height=\"68\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_05dcit6\" bpmnElement=\"TextAnnotation_11q3ahw\"><dc:Bounds x=\"1440\" y=\"270\" width=\"190\" height=\"70\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_1izsk9n_di\" bpmnElement=\"Event_1izsk9n\"><dc:Bounds x=\"1200\" y=\"160\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1vh9nk4_di\" bpmnElement=\"Activity_1vh9nk4\"><dc:Bounds x=\"1300\" y=\"210\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_06rsf7n\" bpmnElement=\"Activity_1mnaiqp\"><dc:Bounds x=\"1300\" y=\"70\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_04rh3p3_di\" bpmnElement=\"Activity_04rh3p3\"><dc:Bounds x=\"1470\" y=\"138\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_1xkw4ba\" bpmnElement=\"Gateway_0ah3ngq\" isMarkerVisible=\"true\"><dc:Bounds x=\"1615\" y=\"153\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1675\" y=\"164\" width=\"84\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_0rri5q2\" bpmnElement=\"Event_13pr8r2\"><dc:Bounds x=\"1792\" y=\"160\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_0q7jjuv\" bpmnElement=\"Activity_1al9zyu\"><dc:Bounds x=\"1695\" y=\"75\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"BPMNShape_03ijfyx\" bpmnElement=\"Activity_1linepl\"><dc:Bounds x=\"1695\" y=\"255\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"BPMNEdge_01be9ag\" bpmnElement=\"Association_1k82moa\"><di:waypoint x=\"1400\" y=\"80\" /><di:waypoint x=\"1420\" y=\"80\" /><di:waypoint x=\"1460\" y=\"80\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_1kowv7f_di\" bpmnElement=\"Association_1kowv7f\"><di:waypoint x=\"1400\" y=\"277\" /><di:waypoint x=\"1440\" y=\"298\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0e2milx_di\" bpmnElement=\"Flow_0e2milx\"><di:waypoint x=\"1236\" y=\"178\" /><di:waypoint x=\"1268\" y=\"178\" /><di:waypoint x=\"1268\" y=\"110\" /><di:waypoint x=\"1300\" y=\"110\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1qzjp8h_di\" bpmnElement=\"Flow_1qzjp8h\"><di:waypoint x=\"1400\" y=\"250\" /><di:waypoint x=\"1440\" y=\"250\" /><di:waypoint x=\"1440\" y=\"178\" /><di:waypoint x=\"1470\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"BPMNEdge_0b3kabu\" bpmnElement=\"Flow_0c2yo7g\"><di:waypoint x=\"1725\" y=\"90\" /><di:waypoint x=\"1810\" y=\"90\" /><di:waypoint x=\"1810\" y=\"160\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"BPMNEdge_09c03k2\" bpmnElement=\"Flow_1otwlsz\"><di:waypoint x=\"1640\" y=\"153\" /><di:waypoint x=\"1640\" y=\"90\" /><di:waypoint x=\"1695\" y=\"90\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1638\" y=\"71\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"BPMNEdge_1dkndya\" bpmnElement=\"Flow_0yosttx\"><di:waypoint x=\"1640\" y=\"203\" /><di:waypoint x=\"1640\" y=\"270\" /><di:waypoint x=\"1695\" y=\"270\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1645\" y=\"246\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_171wek0_di\" bpmnElement=\"Flow_171wek0\"><di:waypoint x=\"1570\" y=\"178\" /><di:waypoint x=\"1615\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_00xstmy_di\" bpmnElement=\"Flow_00xstmy\"><di:waypoint x=\"1236\" y=\"178\" /><di:waypoint x=\"1268\" y=\"178\" /><di:waypoint x=\"1268\" y=\"250\" /><di:waypoint x=\"1300\" y=\"250\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0y53ouc_di\" bpmnElement=\"Flow_0y53ouc\"><di:waypoint x=\"1400\" y=\"110\" /><di:waypoint x=\"1440\" y=\"110\" /><di:waypoint x=\"1440\" y=\"178\" /><di:waypoint x=\"1470\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_10c52wl_di\" bpmnElement=\"Flow_10c52wl\"><di:waypoint x=\"1725\" y=\"270\" /><di:waypoint x=\"1810\" y=\"270\" /><di:waypoint x=\"1810\" y=\"196\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataInputAssociation_17r5rlk_di\" bpmnElement=\"DataInputAssociation_17r5rlk\"><di:waypoint x=\"561\" y=\"305\" /><di:waypoint x=\"560\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0hrntp0_di\" bpmnElement=\"Flow_0hrntp0\"><di:waypoint x=\"610\" y=\"178\" /><di:waypoint x=\"665\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_00uh5zi_di\" bpmnElement=\"Flow_00uh5zi\"><di:waypoint x=\"448\" y=\"178\" /><di:waypoint x=\"510\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0fqwnfb_di\" bpmnElement=\"Flow_0fqwnfb\"><di:waypoint x=\"715\" y=\"178\" /><di:waypoint x=\"780\" y=\"178\" /><bpmndi:BPMNLabel><dc:Bounds x=\"731\" y=\"163\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1ag74p7_di\" bpmnElement=\"Flow_1ag74p7\"><di:waypoint x=\"995\" y=\"178\" /><di:waypoint x=\"1065\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0lhekcx_di\" bpmnElement=\"Flow_0lhekcx\"><di:waypoint x=\"1095\" y=\"178\" /><di:waypoint x=\"1160\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1fndhvi_di\" bpmnElement=\"Flow_1fndhvi\"><di:waypoint x=\"2030\" y=\"178\" /><di:waypoint x=\"2092\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_10w7jgx_di\" bpmnElement=\"Flow_10w7jgx\"><di:waypoint x=\"1890\" y=\"178\" /><di:waypoint x=\"1930\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0z1bkrr_di\" bpmnElement=\"Flow_0z1bkrr\"><di:waypoint x=\"690\" y=\"203\" /><di:waypoint x=\"690\" y=\"312\" /><bpmndi:BPMNLabel><dc:Bounds x=\"699\" y=\"254\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_09h1spc_di\" bpmnElement=\"Flow_09h1spc\"><di:waypoint x=\"880\" y=\"178\" /><di:waypoint x=\"965\" y=\"178\" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Group_02jjq0w_di\" bpmnElement=\"Group_02jjq0w\"><dc:Bounds x=\"485\" y=\"-45\" width=\"415\" height=\"445\" /><bpmndi:BPMNLabel><dc:Bounds x=\"652\" y=\"-38\" width=\"82\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_16avw1g_di\" bpmnElement=\"Group_16avw1g\"><dc:Bounds x=\"930\" y=\"-45\" width=\"1120\" height=\"445\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1454\" y=\"-38\" width=\"73\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn2:definitions>",
					"ElementParameters": "[{\"Id\":\"StartEvent_1\",\"Type\":0,\"Parameters\":{},\"SelectedTypeId\":\"ManualTrigger\",\"PromoteResultAs\":null,\"Name\":\"Manual\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1t3j2vx\",\"Type\":1,\"Parameters\":{\"input\":{\"Path\":{\"mode\":\"text\",\"value\":\"{{#var.FilePath}}\"},\"FileEncoding\":{\"mode\":\"select\",\"value\":\"ANSI\"},\"EnableBom\":{\"mode\":\"toggle\",\"value\":false},\"EncodingInString\":{\"mode\":\"text\",\"value\":\"\"}},\"connection\":{\"ConnectionTimeout\":{\"mode\":\"integer\",\"value\":60},\"Address\":{\"mode\":\"csharp\",\"value\":\"#var.ServerAddress\"},\"Port\":{\"mode\":\"integer\",\"value\":22},\"Authentication\":{\"mode\":\"select\",\"value\":\"UsernamePassword\"},\"Username\":{\"mode\":\"csharp\",\"value\":\"#var.ServerUser\"},\"Password\":{\"mode\":\"csharp\",\"value\":\"#var.ServerPassword\"},\"PrivateKeyFile\":{\"mode\":\"text\",\"value\":\"\"},\"PrivateKeyString\":{\"mode\":\"text\",\"value\":\"\"},\"PrivateKeyPassphrase\":{\"mode\":\"text\",\"value\":\"\"},\"ServerFingerPrint\":{\"mode\":\"text\",\"value\":\"\"},\"HostKeyAlgorithm\":{\"mode\":\"select\",\"value\":\"Any\"},\"UseKeyboardInteractiveAuthentication\":{\"mode\":\"toggle\",\"value\":false},\"PromptAndResponse\":[],\"BufferSize\":{\"mode\":\"integer\",\"value\":32}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/7fe311ed-3e37-4669-8c6b-9e5792e996d0/v1\",\"PromoteResultAs\":null,\"Name\":\"Read JSON input file from SFTP server\",\"Description\":\"\",\"IsDefault\":null,\"ShouldRetry\":true,\"MaxRetryCount\":3,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_14nb58k\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"!String.IsNullOrEmpty(#result[Read JSON input file from SFTP server].Content)\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"File read successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataObjectReference_0ksp4rn\",\"Type\":21,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"JSON file\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1mnaiqp\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    string oraCols = \\\"\\\";\\n    string oraVals = \\\"\\\";\\n    \\n    foreach(JProperty a in #var.row)\\n    {\\n        oraCols += $\\\"{a.Name}, \\\";\\n        oraVals += $\\\":{a.Name}, \\\";\\n    }\\n\\n    // Remove trailing commas\\n    oraCols = oraCols.Remove(oraCols.Length-2);\\n    oraVals = oraVals.Remove(oraVals.Length-2);\\n\\n    return $\\\"INSERT INTO  {#var.TableName} ({oraCols}) VALUES ({oraVals}) \\\";\\n\\n\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"insertStatement\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create insert statement\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0fqwnfb\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_04rh3p3\",\"Type\":1,\"Parameters\":{\"input\":{\"Query\":{\"mode\":\"csharp\",\"value\":\"#var.insertStatement\"},\"ConnectionString\":{\"mode\":\"csharp\",\"value\":\"#var.OracleConnectionString\"},\"Parameters\":{\"mode\":\"csharp\",\"value\":\"#var.insertParameters\"}},\"options\":{\"ThrowErrorOnFailure\":{\"mode\":\"toggle\",\"value\":true},\"TimeoutSeconds\":{\"mode\":\"integer\",\"value\":30},\"OracleIsolationLevel\":{\"mode\":\"select\",\"value\":\"ReadCommitted\"},\"BindParameterByName\":{\"mode\":\"toggle\",\"value\":true}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/0bfd5a7b-f89d-44f1-a7a6-d6a110906b04/v1\",\"PromoteResultAs\":null,\"Name\":\"Execute the INSERT statement\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":true,\"MaxRetryCount\":3,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1izsk9n\",\"Type\":13,\"Parameters\":{},\"SelectedTypeId\":\"\",\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0fizi4r\",\"Type\":10,\"Parameters\":{\"variable\":\"row\",\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Parse JSON].Jtoken\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"For Each row in file\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1vh9nk4\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    var parameters = new List<Frends.Oracle.ExecuteQuery.Definitions.QueryParameter>();\\n    foreach(JProperty property in #var.row)\\n    {\\n        var parameter = new Frends.Oracle.ExecuteQuery.Definitions.QueryParameter\\n        {\\n            Name = property.Name,\\n            Value = property.Value.ToString()\\n        };\\n\\n        parameters.Add(parameter);\\n    }\\n\\n    return parameters.ToArray();\\n\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"insertParameters\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create parameter values\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_11zxk0m\",\"Type\":12,\"Parameters\":{\"variableName\":\"successCnt\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"0\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialise success count\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0kvjalz\",\"Type\":12,\"Parameters\":{\"variableName\":\"failCnt\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"0\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialise failure count\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_13pr8r2\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_0ah3ngq\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Execute the INSERT statement].Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Database update successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1al9zyu\",\"Type\":12,\"Parameters\":{\"variableName\":\"\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"#var.successCnt++\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":false}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Increment success count\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1linepl\",\"Type\":12,\"Parameters\":{\"variableName\":\"\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"#var.failCnt++\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":false}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Increment failcount\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1otwlsz\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0yosttx\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_1iedv3k\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.outMsg\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0fx7zdo\",\"Type\":12,\"Parameters\":{\"useStatementMode\":{\"mode\":\"toggle\",\"value\":true},\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"{\\n    var msg = \\\"\\\";\\n    if(#var.successCnt > 0)\\n    {\\n        msg += $\\\"{#var.successCnt} data rows were successfully inserted into table {#var.TableName}.\\\";\\n    }\\n\\n    if(#var.failCnt > 0)\\n    {\\n        msg += $\\\"{Environment.NewLine}{#var.failCnt} data rows were not inserted into table {#var.TableName}.\\\";\\n    }\\n    \\n    return msg;\\n}\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true},\"variableName\":\"outMsg\"},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Create output message\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0pvapan\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An error occured reading the input file {{#var.FilePath}} from SFTP server {{#var.ServerAddress}} - the input JSON file is empty.\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0z1bkrr\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_15xgbxn\",\"Type\":1,\"Parameters\":{\"input\":{\"Json\":{\"mode\":\"csharp\",\"value\":\"#result[Read JSON input file from SFTP server].Content\"}}},\"SelectedTypeId\":\"/ProcessTask/fc3f0ffd-4f6d-4a54-8d19-ef4d00a6b1a6/v2\",\"PromoteResultAs\":null,\"Name\":\"Parse JSON\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null}]",
					"ManualTriggerJson": "[]",
					"IsSubprocess": false,
					"TriggersJson": "[{\"$type\":\"ManualTrigger\",\"config\":{},\"name\":\"Manual\",\"id\":\"StartEvent_1\",\"shouldNotLogParameters\":null}]",
					"AssemblyName": null,
					"PackageId": null,
					"PackageVersion": null,
					"UsedTasksJson": "[\"/ProcessTask/7FE311ED-3E37-4669-8C6B-9E5792E996D0/v1\",\"/ProcessTask/FC3F0FFD-4F6D-4A54-8D19-EF4D00A6B1A6/v2\",\"/ProcessTask/0BFD5A7B-F89D-44F1-A7A6-D6A110906B04/v1\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.2.1685",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 1,
					"MinorVersion": 0,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"050bc8be-da28-4aa2-a24a-9b257e210fb2": [
						{
							"Id": "7fe311ed-3e37-4669-8c6b-9e5792e996d0",
							"PackageId": "Frends.SFTP.ReadFile",
							"PackageVersion": "2.1.0",
							"Name": "Frends.SFTP.ReadFile.SFTP.ReadFile(Input, Connection, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "fc3f0ffd-4f6d-4a54-8d19-ef4d00a6b1a6",
							"PackageId": "Frends.JSON.ConvertJSONStringToJToken",
							"PackageVersion": "1.0.1",
							"Name": "Frends.JSON.ConvertJSONStringToJToken.JSON.ConvertJSONStringToJToken(Input)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "0bfd5a7b-f89d-44f1-a7a6-d6a110906b04",
							"PackageId": "Frends.Oracle.ExecuteQuery",
							"PackageVersion": "2.0.1",
							"Name": "Frends.Oracle.ExecuteQuery.Oracle.ExecuteQuery(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						}
					]
				},
				"LinkedSubProcess": {},
				"Version": "Acc41"
			}
		}
	]
}